]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
userMenu: More show()/hide() refactoring
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 10 May 2012 13:42:36 +0000 (15:42 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 10 May 2012 13:54:37 +0000 (15:54 +0200)
Here's one show()/hide() sequence left out in commit 723a1c843 ...

js/ui/userMenu.js

index 5ae4ae6d66c133c255e55305c38283d8551d28a4..93f4dc337ad8f7c47dba790183bd0052b922cfce 100644 (file)
@@ -544,12 +544,9 @@ const UserMenuButton = new Lang.Class({
 
     _updateSwitchUser: function() {
         let allowSwitch = !this._lockdownSettings.get_boolean(DISABLE_USER_SWITCH_KEY);
-        if (allowSwitch &&
-            this._userManager.can_switch() &&
-            this._userManager.has_multiple_users)
-            this._loginScreenItem.actor.show();
-        else
-            this._loginScreenItem.actor.hide();
+        this._loginScreenItem.actor.visible = allowSwitch &&
+                                              this._userManager.can_switch() &&
+                                              this._userManager.has_multiple_users;
     },
 
     _updateLogout: function() {